﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<MvcEngineModelItem<IList<BlogData>>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title><%= Model.Localize("BlogPageTitle")%></title>
    <%= Html.GetCssFile(Url.GetModuleCssPath("MvcEngine.Blog.BackOffice.css")) %>
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <div class="page-title" id="blogs-header">
         <h1><%= Model.Localize("BlogPageHeader")%></h1>
    </div>

<%= Html.Grid(Model.Item).Columns(column =>
{
    column.For(x => Html.UrlActionLink(x.Name, Url.Blog(x.Name))).Header(Model.Localize("NameHeader")).DoNotEncode();
    column.For(x => x.BlogName).Header(Model.Localize("TitleHeader"));
    column.For(x => x.BlogDescription).Header(Model.Localize("DescriptionHeader"));
    column.For(x => x.Page()).Header(Model.Localize("PageHeader"));
}).Attributes(cellSpacing => "0", cellPadding => "0", border => "0", @class => "entries").RowAttributes(row => 
{ 
    var attributes = new Dictionary<string, object>();
    attributes.Add("class", "entry");
    return attributes;
} ).Footers(footer => 
{
    footer.For(string.Format(Model.Localize("TotalItems"), Model.Item.Count)).Attributes(colspan => "4");
})%>

</asp:Content>
